home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / wasm223.zip / PRESET.ASM < prev    next >
Assembly Source File  |  1993-05-04  |  1KB  |  37 lines

  1. ;================================================
  2. ; Printer Reset
  3. ;
  4. ; Initialize first parallel printer through the
  5. ; BIOS printer routine. Once assembled, to
  6. ; reset the printer, type:
  7. ;
  8. ;   PRESET
  9. ;
  10. ; This routine has the effect of initializing
  11. ; the printer to its power on characteristics.
  12.  
  13. ;--- equates
  14.  
  15. PORT    EQU     0                       ;printer port to initialize
  16.  
  17. ;--- display message
  18.  
  19.         mov     dx, OFFSET pmess        ;message location
  20.         mov     ah, 9                   ;string output
  21.         int     21H                     ;execute
  22.  
  23. ;--- reset printer port
  24.  
  25.         mov     ah, 1                   ;function number
  26.         mov     dx, PORT                ;printer port number
  27.         int     17H                     ;execute
  28.  
  29. ;--- exit
  30.  
  31.         mov     ax, 4C00H               ;function and error code 0
  32.         int     21h                     ;exit
  33.  
  34. ;--- message
  35.  
  36. pmess   DB      13,10,'Printer ', PORT + '0' + 1 ,' reset', 13,10,'$'
  37.